<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div class="background">
<hr class="head_hr">
<div class="tfpic">
    <div id="carousel-data"></div>
</div>
<hr class="head_hr">
<div class="container">
    <div class="row main-content">
        <div class="col-md-2">
            <div class="row">
                <div class="news">
                <div class="news-header">
                    <h2>
                        <small class= "small_name">LOGIN</small>
                    </h2>
                    <div style="width:100px;height: 3px;background-color:#3071a9;position: relative "></div>
                </div>
                <div class="news-body">
                    <div id="denglurukou">
                        <a href="${ctx}/login"><span>登陆入口</span><img src="${ctx}/assets/img/denglurukou.jpg" alt="" border="0"></a>
                    </div>
                </div>
                </div>
            </div>

        </div>
        <div class="col-md-5">
            <div class="news ">
                <div class="news-header">
                    <h2>系统公告
                        <small class= "small_name">NOTICE</small>
                    </h2>
                    <div style="width:100px;height: 3px;background-color:#3071a9;position: relative "></div>
                </div>
                <div class="news-body">
                    <div class="time"></div>
                    <div id=news-data></div>
                </div>
            </div>

        </div>
        <div class="col-md-5">
            <div class="news ">
                <div class="news-header">
                    <h2>相关新闻
                        <small class= "small_name" >NEWS</small>
                    </h2>
                    <div style="width:100px;height: 3px;background-color:#3071a9;position: relative "></div>
                </div>
                <div class="news-body">
                    <div class="time"></div>
                    <div id=news-data1>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
<footer id="footer" class="text-center" >
    <hr>
    <div>
        <div class="list-group col-md-8 col-md-push-2 ">
            <ul class="list-unstyled list-inline text-center">
                <li><a href="${ctx}/about/duty"><img src="${ctx}/assets/img/guanyu.png" alt=""> <figure>使用说明</figure></a></li>
                <li><a href="${ctx}/about/index"><img src="${ctx}/assets/img/shiyong.png" alt=""> <figure>关于我们</figure></a></li>
                <li><a href="${ctx}/about/contactus"><img src="${ctx}/assets/img/lianxi.png" alt=""><figure>联系教务</figure> </a></li>
            </ul>
        </div>
        <div class="clearfix"></div>
        <address class="text-center" style="margin-bottom: 0">
            地址：成都市高新西区西源大道一号
        </address>
        版权所有©四川大学锦城学院计算机科学与软件工程系
    </div>
</footer>
</div>

<script id="carousel-template" type="text/html">
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            {{each result as value i}}
            <li data-target="#carousel-example-generic" data-slide-to="{{i}}" class="{{if i==0}}active{{/if}}"></li>
            {{/each}}
        </ol>
        <div class="carousel-inner" role="listbox">
            {{each result as value i}}
            <div class="item {{if i==0}}active{{/if}}">
                <a href={{value.pushUrl}}>
                    <img src={{value.attachmentUrl}} alt={{value.title}}>
                    <div class="carousel-caption">{{#value.postContent}}</div>
                </a>
            </div>
            {{/each}}
        </div>
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left"></span>
            <span class="sr-only">上一张</span>
        </a>
        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right"></span>
            <span class="sr-only">下一张</span>
        </a>
    </div>
</script>
<%--加载系统--%>
<script id="list-template" type="text/html">
    {{each result as value i}}
    {{if i==0}}
    <div class="news-title">
        <h5><a href="${ctx}/dynamic/information?id={{value.id}}">{{value.postTitle}}</a></h5>
        <hr>
        <p class="content">{{#value.postContent}}<span><a href="${ctx}/dynamic/information?id={{value.id}}">[详情]</a></span></p>
    </div>
    {{/if}}
    {{/each}}
    <div class="clearfix"></div>
    <div class="row">
        <div class="news-list news-left col-md-12 ">
            <ul class=" list-unstyled">
                {{each result as newsList1 j}}
                {{if j<8&&j>0}}
                <li><a href="${ctx}/dynamic/information?id={{newsList1.id}}">{{#newsList1.postTitle}}</a>

                    <div class="news-time"><span class="timeago" title="{{newsList1.postDate}}"></span></div>
                </li>
                {{/if}}
                {{/each}}
            </ul>
        </div>
    </div>
</script>

<%--加载新闻--%>
<script id="list-template1" type="text/html">
    {{each result as value i}}
    {{if i==0}}
    <div class="news-title">
        <h5><a href="${ctx}/dynamic/information?id={{value.id}}">{{value.postTitle}}</a></h5>
        <hr>
        <p class="content">{{#value.postContent}}<span><a href="${ctx}/dynamic/information?id={{value.id}}">[详情]</a></span></p>
    </div>
    {{/if}}
    {{/each}}
    <div class="clearfix"></div>
    <div class="row">
        <div class="news-list news-left col-md-12 ">
            <ul class=" list-unstyled">
                {{each result as newsList1 j}}
                {{if j<8&&j>0}}
                <li><a href="${ctx}/dynamic/information?id={{newsList1.id}}">{{#newsList1.postTitle}}</a>

                    <div class="news-time"><span class="timeago" title="{{newsList1.postDate}}"></span></div>
                </li>
                {{/if}}
                {{/each}}
            </ul>
        </div>
    </div>
</script>

<script type="text/javascript">
    <c:if test="${env == 'pro' }">
    requirejs(['${ctx}/assets/js/app/paper/index-page.js']);
    </c:if>
    <c:if test="${env != 'pro' }">
    requirejs(['${ctx}/assets/js/app/paper/index-page.js']);
    </c:if>
</script>